import send from '../http'
export default {

  /**
   * 查询邮件通知列表
   * @param {object} data
   */
  queryEmailList (data) {
    let req = {
      data: data,
      action: 'config.email.queryEmailList'
    }
    return send.fetch(req, 'post')
  },
  /**
   * 添加，编辑邮件通知
   * @param {object} data
   */
  editEmailConfig (data) {
    let req = {
      data: data,
      action: 'config.email.editEmailConfig'
    }
    return send.fetch(req, 'post')
  },
  /**
   * 添加，编辑邮件通知模版
   * @param {object} data
   */
  editEmailTemplate (data) {
    let req = {
      data: data,
      action: 'config.email.editEmailTemplate'
    }
    return send.fetch(req, 'post')
  },
  /**
   * 删除邮件通知模版
   * @param {object} data
   * @param {Stirng} data._id
   */
  deleteEmailTemplateById (data) {
    let req = {
      data: data,
      action: 'config.email.deleteEmailTemplateById'
    }
    return send.fetch(req, 'post')
  },
  /**
   * 查询邮件通知模版
   * @param {object} data
   * @param {Stirng} data._id
   */
  queryEmailTemplateById (data) {
    let req = {
      data: data,
      action: 'config.email.queryEmailTemplateById'
    }
    return send.fetch(req, 'post')
  },
  /**
   * 查询邮件通知模版列表
   * @param {object} data
   */
  queryEmailTemplateList (data) {
    let req = {
      data: data,
      action: 'config.email.queryEmailTemplateList'
    }
    return send.fetch(req, 'post')
  }
}